3.5.66 \(\int \cot ^4(e+f x) \sqrt {a-a \sin ^2(e+f x)} \, dx\) [466]

Optimal. Leaf size=91 \[ \frac {2 \sqrt {a \cos ^2(e+f x)} \csc (e+f x) \sec (e+f x)}{f}-\frac {\sqrt {a \cos ^2(e+f x)} \csc ^3(e+f x) \sec (e+f x)}{3 f}+\frac {\sqrt {a \cos ^2(e+f x)} \tan (e+f x)}{f} \]

[Out]

2*csc(f*x+e)*sec(f*x+e)*(a*cos(f*x+e)^2)^(1/2)/f-1/3*csc(f*x+e)^3*sec(f*x+e)*(a*cos(f*x+e)^2)^(1/2)/f+(a*cos(f
*x+e)^2)^(1/2)*tan(f*x+e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3255, 3286, 2670, 276} \begin {gather*} \frac {\tan (e+f x) \sqrt {a \cos ^2(e+f x)}}{f}-\frac {\csc ^3(e+f x) \sec (e+f x) \sqrt {a \cos ^2(e+f x)}}{3 f}+\frac {2 \csc (e+f x) \sec (e+f x) \sqrt {a \cos ^2(e+f x)}}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^4*Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

(2*Sqrt[a*Cos[e + f*x]^2]*Csc[e + f*x]*Sec[e + f*x])/f - (Sqrt[a*Cos[e + f*x]^2]*Csc[e + f*x]^3*Sec[e + f*x])/
(3*f) + (Sqrt[a*Cos[e + f*x]^2]*Tan[e + f*x])/f

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2670

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \cot ^4(e+f x) \sqrt {a-a \sin ^2(e+f x)} \, dx &=\int \sqrt {a \cos ^2(e+f x)} \cot ^4(e+f x) \, dx\\ &=\left (\sqrt {a \cos ^2(e+f x)} \sec (e+f x)\right ) \int \cos (e+f x) \cot ^4(e+f x) \, dx\\ &=-\frac {\left (\sqrt {a \cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x^4} \, dx,x,-\sin (e+f x)\right )}{f}\\ &=-\frac {\left (\sqrt {a \cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \left (1+\frac {1}{x^4}-\frac {2}{x^2}\right ) \, dx,x,-\sin (e+f x)\right )}{f}\\ &=\frac {2 \sqrt {a \cos ^2(e+f x)} \csc (e+f x) \sec (e+f x)}{f}-\frac {\sqrt {a \cos ^2(e+f x)} \csc ^3(e+f x) \sec (e+f x)}{3 f}+\frac {\sqrt {a \cos ^2(e+f x)} \tan (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 47, normalized size = 0.52 \begin {gather*} -\frac {\sqrt {a \cos ^2(e+f x)} \left (-3-6 \csc ^2(e+f x)+\csc ^4(e+f x)\right ) \tan (e+f x)}{3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^4*Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

-1/3*(Sqrt[a*Cos[e + f*x]^2]*(-3 - 6*Csc[e + f*x]^2 + Csc[e + f*x]^4)*Tan[e + f*x])/f

________________________________________________________________________________________

Maple [A]
time = 3.92, size = 55, normalized size = 0.60

method result size
default \(\frac {\cos \left (f x +e \right ) a \left (3 \left (\sin ^{4}\left (f x +e \right )\right )+6 \left (\sin ^{2}\left (f x +e \right )\right )-1\right )}{3 \sin \left (f x +e \right )^{3} \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) \(55\)
risch \(-\frac {i \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, {\mathrm e}^{2 i \left (f x +e \right )}}{2 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {i \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}}{2 \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) f}+\frac {4 i \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, \left (3 \,{\mathrm e}^{6 i \left (f x +e \right )}-4 \,{\mathrm e}^{4 i \left (f x +e \right )}+3 \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{3 \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}\) \(193\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^4*(a-a*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/3*cos(f*x+e)*a*(3*sin(f*x+e)^4+6*sin(f*x+e)^2-1)/sin(f*x+e)^3/(a*cos(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 61, normalized size = 0.67 \begin {gather*} \frac {8 \, \sqrt {a} \tan \left (f x + e\right )^{4} + 4 \, \sqrt {a} \tan \left (f x + e\right )^{2} - \sqrt {a}}{3 \, \sqrt {\tan \left (f x + e\right )^{2} + 1} f \tan \left (f x + e\right )^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4*(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

1/3*(8*sqrt(a)*tan(f*x + e)^4 + 4*sqrt(a)*tan(f*x + e)^2 - sqrt(a))/(sqrt(tan(f*x + e)^2 + 1)*f*tan(f*x + e)^3
)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 66, normalized size = 0.73 \begin {gather*} -\frac {{\left (3 \, \cos \left (f x + e\right )^{4} - 12 \, \cos \left (f x + e\right )^{2} + 8\right )} \sqrt {a \cos \left (f x + e\right )^{2}}}{3 \, {\left (f \cos \left (f x + e\right )^{3} - f \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4*(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/3*(3*cos(f*x + e)^4 - 12*cos(f*x + e)^2 + 8)*sqrt(a*cos(f*x + e)^2)/((f*cos(f*x + e)^3 - f*cos(f*x + e))*si
n(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )} \cot ^{4}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**4*(a-a*sin(f*x+e)**2)**(1/2),x)

[Out]

Integral(sqrt(-a*(sin(e + f*x) - 1)*(sin(e + f*x) + 1))*cot(e + f*x)**4, x)

________________________________________________________________________________________

Giac [A]
time = 0.53, size = 132, normalized size = 1.45 \begin {gather*} \frac {{\left ({\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}^{3} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) - 24 \, {\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) - \frac {48 \, \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )}{\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}\right )} \sqrt {a}}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4*(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

1/24*((1/tan(1/2*f*x + 1/2*e) + tan(1/2*f*x + 1/2*e))^3*sgn(tan(1/2*f*x + 1/2*e)^4 - 1) - 24*(1/tan(1/2*f*x +
1/2*e) + tan(1/2*f*x + 1/2*e))*sgn(tan(1/2*f*x + 1/2*e)^4 - 1) - 48*sgn(tan(1/2*f*x + 1/2*e)^4 - 1)/(1/tan(1/2
*f*x + 1/2*e) + tan(1/2*f*x + 1/2*e)))*sqrt(a)/f

________________________________________________________________________________________

Mupad [B]
time = 18.42, size = 364, normalized size = 4.00 \begin {gather*} \frac {\left (\frac {1{}\mathrm {i}}{f}-\frac {{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}}{f}\right )\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}}{{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1}+\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,8{}\mathrm {i}}{f\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}+\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,16{}\mathrm {i}}{3\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^2\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}+\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,16{}\mathrm {i}}{3\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^3\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^4*(a - a*sin(e + f*x)^2)^(1/2),x)

[Out]

((1i/f - (exp(e*2i + f*x*2i)*1i)/f)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2))
/(exp(e*2i + f*x*2i) + 1) + (exp(e*3i + f*x*3i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/
2)^2)^(1/2)*8i)/(f*(exp(e*2i + f*x*2i) - 1)*(exp(e*1i + f*x*1i) + exp(e*3i + f*x*3i))) + (exp(e*3i + f*x*3i)*(
a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2)*16i)/(3*f*(exp(e*2i + f*x*2i) - 1)^2*
(exp(e*1i + f*x*1i) + exp(e*3i + f*x*3i))) + (exp(e*3i + f*x*3i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*
1i + f*x*1i)*1i)/2)^2)^(1/2)*16i)/(3*f*(exp(e*2i + f*x*2i) - 1)^3*(exp(e*1i + f*x*1i) + exp(e*3i + f*x*3i)))

________________________________________________________________________________________